{% extends 'product/product_base.html' %}

{% block content %}
    <div class="shopping-cart-products">
        {% if order_quantity_of_products %}
            <span class="selected-number-of-products">
                Выбрано продуктов: {{ order_quantity_of_products }}
            </span>
            <div class="shopping-cart-list">
                {% for product in order_products %}
                    <div class="cart-product">
                        <div class="cart-product-header">
                            <div class="cart-product-name">
                                {{ product.name }}
                            </div>
                            <div class="cart-product-actions">
                            </div>
                        </div>
                        <div class="cart-product-footer">
                            <div class="cart-product-price">
                                {{ product.price }}
                            </div>
                        </div>
                    </div>
                {% endfor %}
            </div>
            <span class="total-price-of-products">
                Общая стоимость: {{ order_amount }} рублей
            </span>
            <form class="buy-shopping-cart-form" method="post">
                {% csrf_token %}
                <button class="standard-button" type="submit" data-buy-shopping-cart>
                    Купить
                </button>
            </form>
        {% else %}
            <span class="empty-shopping-cart">
                Корзина пустует, добавьте какой-нибудь продукт
            </span>
        {% endif %}
    </div>
{% endblock content %}
